from selenium import webdriver
import time

print('6666666666666666666')
driver = webdriver.Chrome()
file_path = 'C:/Users/weibi/Downloads/222.txt'
count = 0
with open(file_path, 'r') as file:
    print('44444444')
    for line in file:
        print('555555555555555')
        if len(line) > 15:
            print('小于50' + line)
            continue
        else:
            line = 'https://cdn77-vid.xvideos-cdn.com/qUvXWBXAbojBVInj0CSE_Q==,1752512499/videos/hls/32/81/0b/32810be60face15257bb6d7e24219f5f/'+line
            print(line)
            count += 1
            print('我是第' + str(count) + '行')
            # parts = line.split('/')
            # path = 'C:/Users/weibi/Downloads/' + line.split('/')[7].split('.')[0]+".ts"
            if count > 0:
                print(line)
                driver.get(line)
                time.sleep(10)
                # os.rename(path, 'C:/Users/weibi/Downloads/'+str(count)+'.ts')
                print("success")
time.sleep(40)
driver.close()
